[nanvix] fix(z): disable libc++ filesystem (incomplete POSIX fs in Nanvix libc)#38
Merged
Merged
Conversation
…nvix libc) With localization disabled, the libc++ build reached <filesystem> and failed: filesystem/operations.cpp: error: use of undeclared identifier '_PC_PATH_MAX' filesystem/operations.cpp: error: use of undeclared identifier 'copy_file_impl_fstream' libc++'s <filesystem> uses POSIX facilities the Nanvix libc does not provide (e.g. _PC_PATH_MAX for pathconf), and its copy_file fallback is implemented with <fstream>, which is unavailable now that localization (and thus the iostream/fstream machinery) is off. Set LIBCXX_ENABLE_FILESYSTEM=OFF to match libc++ to the libc. Drops <filesystem>. Re-enable once the Nanvix libc provides the required POSIX filesystem API (and iostream is available again). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With localization disabled (#37), the libc++ build reached
<filesystem>and failed:libc++'s
<filesystem>uses POSIX facilities the Nanvix libc doesn't provide (e.g._PC_PATH_MAXforpathconf), and itscopy_filefallback is implemented with<fstream>— unavailable now that localization (and thus iostream/fstream) is off.Fix
-DLIBCXX_ENABLE_FILESYSTEM=OFF. Matches libc++ to the libc; drops<filesystem>. Reversible once the Nanvix libc provides the required POSIX filesystem API (and iostream is available again).Caveat
Iterative stage-1 bring-up converging on a minimal libc++ for the minimal Nanvix libc (so far: wide-chars, localization, filesystem off). Subsequent libc++ compile or link issues may surface next. Validated on merge.